from_bytes

pure static function from_bytes(bytes: byte_array, [ignore_errors: boolean]): text

Creates text from bytes, optionally handling invalid UTF-8 encoding.

Since

0.9.0

Parameters

bytes

The byte array to convert to text.

ignore_errors

If true, replaces invalid characters with a placeholder; if false, throws an exception on encountering invalid bytes.